# $Id$
# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
pkgname=pcmciautils
pkgver=018
pkgrel=7
pkgdesc="Utilities for inserting and removing PCMCIA cards"
arch=('i686' 'x86_64')
url="http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html"
license=('GPL')
groups=('base')
depends=('systemd')
conflicts=('pcmcia-cs')
# source=(http://kernel.org/pub/linux/utils/kernel/pcmcia/${pkgname}-${pkgver}.tar.bz2) broken due to breakin
source=(https://sources.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.xz
        initcpio-install-pcmcia)
options=(!makeflags)

build() {
  cd "$pkgname-$pkgver"
  sed -i -e 's,/lib/udev,/usr/lib/udev,g' Makefile
  sed -i -e 's,/sbin,/usr/bin,g' Makefile
  make
}

package() {
  make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install

  # install the mkinitpcio hook
  install -Dm644 initcpio-install-pcmcia "$pkgdir/usr/lib/initcpio/install/pcmcia"
}
md5sums=('2e9469c44dcb790d2b497723c2fa0566'
         '041af04025daee5b3b05812ac3896c8f')
